package com.carkeeper.system.dao;

import com.carkeeper.system.pojo.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;


@Repository
public interface EmployeeDao extends Mapper<Employee> {

    //自定义查询
    //根据员工id查询角色列表
    @Select("select name from tb_role  where id in (select role_id from tb_employee_role where employee_id=${employeeId})")
     List<String> findNameByEmployeeId(@Param("employeeId") Long employeeId);
}
